
var urlSplit = window.location.href.split("/");
var common = {
    prize: {},
    url: window.location.protocol + "//" + window.location.host + "/" + urlSplit[3] + "/" + urlSplit[4],
};

$.ajax({
    type: 'get',
    url: common.url + "/external/getServerConfig",
    dataType: "json",
    success: function (data) {

        if (!data.success) {
            return;
        }

        var resp = JSON.parse(data.content.serverConfig);

        var tempKeys = [];

        for (var i = 0; i < resp.groupList.length; i++) {
            tempKeys.push(resp.groupList[i]["group_id"]);
        }
        
        for (var j = 0; j < tempKeys.length; j++) {
            var temp = resp[tempKeys[j]];
            for (var k = 0; k < temp.length; k++) {
                if (temp[k]["key"] == "rule") {
                    $('#rule').html(temp[k]["value"]);
                }
            }
        }
    },
});